#define _CRT_SECURE_NO_WARNINGS 1


#include<string>
#include<iostream>

using namespace std;

int main()
{
	string s;
	cin >> s;
	int letter = 0, num = 0, rest = 0;
	for (auto& e : s)
	{
		if ((e >= 'a' && e <= 'z') || (e >= 'A' && e <= 'Z'))
		{
			letter++;
		}
		else if (e >= '0' && e <= '9')
		{
			num++;
		}
		else
		{
			rest++;
		}
	}
	cout << letter << ' ' << num << ' ' << rest << endl;

	return 0;
}